<!doctype html>
<html class="default no-js">
<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<title>Authorization | React Native Background Geolocation</title>
	<meta name="description" content="Documentation for React Native Background Geolocation">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<link rel="stylesheet" href="../assets/css/main.css">
	<link rel="shortcut icon" class="favicon" href="../assets/images/favicon.ico">
	<script src="../assets/js/search.js"></script>
</head>
<body>
<header>
	<div class="tsd-page-toolbar">
		<div class="container">
			<div class="table-wrap">
				<div class="table-cell left">
					<div class="brand">
						<a class="logo" href="https://www.transistorsoft.com"><img src="../assets/images/transistor-logo-bw.svg" /></a>
						<span class="title">
							<a href="/react-native-background-geolocation">[API Docs] React Native Background Geolocation</a>&nbsp;<span class="tsd-flag ts-flagOptional ts-flagVersion">v 4.18.0</span>
						</span>
					</div>
				</div>
				<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
					<div class="field">
						<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
						<input id="tsd-search-field" type="text" />
					</div>
					<ul class="results">
						<li class="state loading"></li>
						<li class="state failure">The search index is not available</li>
					</ul>
				</div>
				<div class="table-cell" id="tsd-widgets">
					<div id="tsd-filter">
						<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
						<div class="tsd-filter-group">
							<div class="tsd-select" id="tsd-filter-visibility">
								<span class="tsd-select-label">All</span>
								<ul class="tsd-select-list">
									<li data-value="public">Public</li>
									<li data-value="protected">Public/Protected</li>
									<li data-value="private" class="selected">All</li>
								</ul>
							</div>
							<input type="checkbox" id="tsd-filter-inherited" checked />
							<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
						</div>
					</div>
					<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
				</div>
			</div>
		</div>
	</div>
	<div class="tsd-page-title">
		<div class="container">
			<ul class="tsd-breadcrumb">
				<li>
					<a href="../index.html">React Native Background Geolocation</a>
				</li>
				<li>
					<a href="authorization.html">Authorization</a>
				</li>
			</ul>
			<h1>Interface Authorization</h1>
		</div>
	</div>
</header>
<div class="container container-main">
	<div class="row">
		<div class="col-9 col-content">
			<section class="tsd-panel tsd-comment">
				<div class="tsd-comment tsd-typography">
					<div class="lead">
						<p>Configures the SDK for authorization wtih your server&#39;s <a href="authorization.html#accesstoken">accessToken</a> token (eg: <a href="https://jwt.io/">JSON Web Token</a>) and automatically requests new tokens when server returns HTTP status <code>&quot;401 Unauthorized&quot;</code>.</p>
					</div>
					<p><strong>Note:</strong> Only <em><a href="https://jwt.io/">JSON Web Token</a></em> (JWT) is currently supported.</p>
					<p>The SDK will automatically apply the configured <a href="authorization.html#accesstoken">accessToken</a> to each HTTP request&#39;s <code>Authorization</code> header, eg:</p>
					<p><code>&quot;Authorization&quot;: &quot;Bearer XXX.YYY.ZZZ&quot;</code></p>
					<p>When using <a href="config.html#authorization">Config.authorization</a>, you do <strong>not</strong> need to manually configure <a href="config.html#headers">Config.headers</a> with the <code>Authorization</code> parameter.  It is all <strong>automatic</strong>.</p>
					<p>If provided with <a href="authorization.html#refreshurl">refreshUrl</a>, <a href="authorization.html#refreshtoken">refreshToken</a> and <a href="authorization.html#refreshpayload">refreshPayload</a>, the SDK can automatically re-register for a new token after expiration, such as when an HTTP response <code>401 Unauthorized</code> is received.</p>
					<a href="#configuration" id="configuration" style="color: inherit; text-decoration: none;">
						<h2>Configuration</h2>
					</a>
					<dl class="tsd-comment-tags">
						<dt class="tsd-comment-tag-example">example</dt>
						<dd><pre><code class="language-typescript"><span style="color: #66D9EF">let</span><span style="color: #F8F8F2"> myToken </span><span style="color: #F92672">=</span><span style="color: #F8F8F2"> </span><span style="color: #FD971F">this</span><span style="color: #F8F8F2">.</span><span style="color: #A6E22E">getMyAuthorizationToken</span><span style="color: #F8F8F2">();</span>

<span style="color: #F8F8F2">BackgroundGeolocation.</span><span style="color: #A6E22E">onAuthorization</span><span style="color: #F8F8F2">((</span><span style="color: #FD971F">event</span><span style="color: #F8F8F2">) </span><span style="color: #66D9EF">=&gt;</span><span style="color: #F8F8F2"> {</span>
<span style="color: #F8F8F2">  </span><span style="color: #F92672">if</span><span style="color: #F8F8F2"> (event.success) {</span>
<span style="color: #F8F8F2">    console.</span><span style="color: #A6E22E">log</span><span style="color: #F8F8F2">(</span><span style="color: #E6DB74">&quot;[authorization] ERROR: &quot;</span><span style="color: #F8F8F2">, event.error);</span>
<span style="color: #F8F8F2">  } </span><span style="color: #F92672">else</span><span style="color: #F8F8F2"> {</span>
<span style="color: #F8F8F2">    console.</span><span style="color: #A6E22E">log</span><span style="color: #F8F8F2">(</span><span style="color: #E6DB74">&quot;[authorization] SUCCESS: &quot;</span><span style="color: #F8F8F2">, event.response);</span>
<span style="color: #F8F8F2">  }</span>
<span style="color: #F8F8F2">});</span>

<span style="color: #F8F8F2">BackgroundGeolocation.</span><span style="color: #A6E22E">ready</span><span style="color: #F8F8F2">({</span>
<span style="color: #F8F8F2">  url: </span><span style="color: #E6DB74">&quot;https://app.your.server.com/users/locations&quot;</span><span style="color: #F8F8F2">,</span>
<span style="color: #F8F8F2">  autoSync: </span><span style="color: #AE81FF">true</span><span style="color: #F8F8F2">,</span>
<span style="color: #F8F8F2">  authorization: {</span>
<span style="color: #F8F8F2">    strategy: </span><span style="color: #E6DB74">&quot;JWT&quot;</span><span style="color: #F8F8F2">,</span>
<span style="color: #F8F8F2">    accessToken: myToken.accessToken,</span>
<span style="color: #F8F8F2">    refreshToken: myToken.refreshToken,</span>
<span style="color: #F8F8F2">    refreshUrl: </span><span style="color: #E6DB74">&quot;https://auth.your.server.com/tokens&quot;</span><span style="color: #F8F8F2">,</span>
<span style="color: #F8F8F2">    refreshPayload: {</span>
<span style="color: #F8F8F2">      the_refresh_token_field_name: </span><span style="color: #E6DB74">&quot;{refreshToken}&quot;</span>
<span style="color: #F8F8F2">    },</span>
<span style="color: #F8F8F2">    expires: myToken.expiresAt</span>
<span style="color: #F8F8F2">  }</span>
<span style="color: #F8F8F2">});</span>
</code></pre>
							<a href="#receiving-the-response-from-refreshurl" id="receiving-the-response-from-refreshurl" style="color: inherit; text-decoration: none;">
								<h2>Receiving the Response from <a href="authorization.html#refreshurl">refreshUrl</a>.</h2>
							</a>
							<p>Whenever a response is received from <a href="authorization.html#refreshurl">refreshUrl</a>, the SDK will fire the <a href="../classes/backgroundgeolocation.html#onauthorization">BackgroundGeolocation.onAuthorization</a> event.  Your callback will be provided an <a href="authorizationevent.html">AuthorizationEvent</a>.  Check <a href="authorizationevent.html#success">AuthorizationEvent.success</a>:</p>
							<ul>
								<li>When successful, <a href="authorizationevent.html#response">AuthorizationEvent.response</a> will contain the decoded JSON from <a href="authorization.html#refreshurl">refreshUrl</a>.</li>
								<li>When a failure occurs, <a href="authorizationevent.html#error">AuthorizationEvent.error</a> will contain an error message.</li>
							</ul>
						</dd>
						<dt class="tsd-comment-tag-example">example</dt>
						<dd><pre><code class="language-typescript"><span style="color: #F8F8F2">BackgroundGeolocation.</span><span style="color: #A6E22E">onAuthorization</span><span style="color: #F8F8F2">((</span><span style="color: #FD971F">event</span><span style="color: #F8F8F2">) </span><span style="color: #66D9EF">=&gt;</span><span style="color: #F8F8F2"> {</span>
<span style="color: #F8F8F2">  </span><span style="color: #F92672">if</span><span style="color: #F8F8F2"> (event.success) {</span>
<span style="color: #F8F8F2">    console.</span><span style="color: #A6E22E">log</span><span style="color: #F8F8F2">(</span><span style="color: #E6DB74">&quot;[authorization] ERROR: &quot;</span><span style="color: #F8F8F2">, event.error);</span>
<span style="color: #F8F8F2">  } </span><span style="color: #F92672">else</span><span style="color: #F8F8F2"> {</span>
<span style="color: #F8F8F2">    console.</span><span style="color: #A6E22E">log</span><span style="color: #F8F8F2">(</span><span style="color: #E6DB74">&quot;[authorization] SUCCESS: &quot;</span><span style="color: #F8F8F2">, event.response);</span>
<span style="color: #F8F8F2">  }</span>
<span style="color: #F8F8F2">});</span>
</code></pre>
						</dd>
					</dl>
				</div>
			</section>
			<section class="tsd-panel tsd-hierarchy">
				<h3>Hierarchy</h3>
				<ul class="tsd-hierarchy">
					<li>
						<span class="target">Authorization</span>
					</li>
				</ul>
			</section>
			<section class="tsd-panel-group tsd-index-group">
				<h2>Index</h2>
				<section class="tsd-panel tsd-index-panel">
					<div class="tsd-index-content">
						<section class="tsd-index-section ">
							<h3>Properties</h3>
							<ul class="tsd-index-list">
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="authorization.html#accesstoken" class="tsd-kind-icon">access<wbr>Token</a></li>
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="authorization.html#expires" class="tsd-kind-icon">expires</a></li>
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="authorization.html#refreshheaders" class="tsd-kind-icon">refresh<wbr>Headers</a></li>
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="authorization.html#refreshpayload" class="tsd-kind-icon">refresh<wbr>Payload</a></li>
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="authorization.html#refreshtoken" class="tsd-kind-icon">refresh<wbr>Token</a></li>
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="authorization.html#refreshurl" class="tsd-kind-icon">refresh<wbr>Url</a></li>
								<li class="tsd-kind-property tsd-parent-kind-interface"><a href="authorization.html#strategy" class="tsd-kind-icon">strategy</a></li>
							</ul>
						</section>
					</div>
				</section>
			</section>
			<section class="tsd-panel-group tsd-member-group ">
				<h2>Properties</h2>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="accesstoken" class="tsd-anchor"></a>
					<h3>access<wbr>Token</h3>
					<div class="tsd-signature tsd-kind-icon">access<wbr>Token<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
					<aside class="tsd-sources">
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>Authorization token (eg: <a href="https://jwt.io/">JWT</a>) required for authorization by your server at <a href="config.html#url">Config.url</a>.</p>
						</div>
						<p>The SDK will automatically apply the configured <code>accessToken</code> to each HTTP request&#39;s <code>Authorization</code> header, eg:</p>
						<p><code>&quot;Authorization&quot;: &quot;Bearer XXX.YYY.ZZZ&quot;</code></p>
						<p>You do <strong>not</strong> need to manually configure <a href="config.html#headers">Config.headers</a> with the <code>Authorization</code> parameter.  It is all <strong>automatic</strong>.</p>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="expires" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagOptional">Optional</span> expires</h3>
					<div class="tsd-signature tsd-kind-icon">expires<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
					<aside class="tsd-sources">
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>Token expiry time in seconds.</p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="refreshheaders" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagOptional">Optional</span> refresh<wbr>Headers</h3>
					<div class="tsd-signature tsd-kind-icon">refresh<wbr>Headers<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
					<aside class="tsd-sources">
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>Optional headers applied on requests to <a href="authorization.html#refreshurl">refreshUrl</a>
							Defaults to: <code>{&quot;Authorization&quot;:  &quot;Bearer {accessToken}&quot;}</code></p>
						</div>
						<p>The template variable <code>{accessToken}</code> will automatically be replaced with your app&#39;s current auth token.</p>
						<p>If you do not want <em>any</em> headers applied on requests to {refreshUrl}, provide an empty <code>{}</code>.</p>
						<a href="#example" id="example" style="color: inherit; text-decoration: none;">
							<h2>Example</h2>
						</a>
						<pre><code class="language-typescript"><span style="color: #F8F8F2">BackgroundGeolocation.</span><span style="color: #A6E22E">ready</span><span style="color: #F8F8F2">({</span>
<span style="color: #F8F8F2">  authorization: {</span>
<span style="color: #F8F8F2">    accessToken: </span><span style="color: #E6DB74">&quot;XXX.YYY.ZZZ&quot;</span><span style="color: #F8F8F2">,</span>
<span style="color: #F8F8F2">    refreshUrl: </span><span style="color: #E6DB74">&quot;https://auth.domain.com/tokens&quot;</span><span style="color: #F8F8F2">,</span>
<span style="color: #F8F8F2">    refreshToken: </span><span style="color: #E6DB74">&quot;smTsfaspfgaadsfgqZerUt0wueflasdfkaxjdfeKIacb&quot;</span><span style="color: #F8F8F2">,</span>
<span style="color: #F8F8F2">    refreshPayload: {</span>
<span style="color: #F8F8F2">      </span><span style="color: #E6DB74">&quot;my_refresh_token&quot;</span><span style="color: #F8F8F2">: </span><span style="color: #E6DB74">&quot;{refreshToken}&quot;</span><span style="color: #F8F8F2">, </span><span style="color: #88846F">// &lt;-- replaced with configured refreshToken above.</span>
<span style="color: #F8F8F2">      </span><span style="color: #E6DB74">&quot;grant_type&quot;</span><span style="color: #F8F8F2">: </span><span style="color: #E6DB74">&quot;refresh_token&quot;</span><span style="color: #F8F8F2">,        </span><span style="color: #88846F">// &lt;-- arbitrary fields required by your auth server</span>
<span style="color: #F8F8F2">      </span><span style="color: #E6DB74">&quot;foo&quot;</span><span style="color: #F8F8F2">: </span><span style="color: #E6DB74">&quot;another arbitrary field&quot;</span>
<span style="color: #F8F8F2">    },</span>
<span style="color: #F8F8F2">    refreshHeaders: {}  </span><span style="color: #88846F">// &lt;-- Empty {} to provide no refreshHeaders.</span>
<span style="color: #F8F8F2">  )</span>
<span style="color: #F8F8F2">));</span>
</code></pre>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="refreshpayload" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagOptional">Optional</span> refresh<wbr>Payload</h3>
					<div class="tsd-signature tsd-kind-icon">refresh<wbr>Payload<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
					<aside class="tsd-sources">
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>Refresh payload will be encoded into the FORM POST to the <a href="authorization.html#refreshurl">refreshUrl</a> when requesting a new <a href="authorization.html#accesstoken">accessToken</a> after expiration.</p>
						</div>
						<p>You <em>must</em> provide one field-template which will represent your &quot;refresh token&quot; using the value: <strong><code>{refreshToken}</code></strong>.  The SDK will
						<em>automatically</em> replace this simple template with the configured <a href="authorization.html#refreshtoken">refreshToken</a>.</p>
						<dl class="tsd-comment-tags">
							<dt class="tsd-comment-tag-example">example</dt>
							<dd><pre><code class="language-typescript"><span style="color: #F8F8F2">BackgroundGeolocation.</span><span style="color: #A6E22E">ready</span><span style="color: #F8F8F2">({</span>
<span style="color: #F8F8F2">  authorization: {</span>
<span style="color: #F8F8F2">    strategy: </span><span style="color: #E6DB74">&quot;JWT&quot;</span><span style="color: #F8F8F2">,</span>
<span style="color: #F8F8F2">    accessToken: </span><span style="color: #E6DB74">&quot;XXX.YYY.ZZZ&quot;</span><span style="color: #F8F8F2">,</span>
<span style="color: #F8F8F2">    refreshUrl: </span><span style="color: #E6DB74">&quot;https://auth.your.server.com/tokens&quot;</span><span style="color: #F8F8F2">,</span>
<span style="color: #F8F8F2">    refreshToken: </span><span style="color: #E6DB74">&quot;smTsfaspfgaadsfgqZerUt0wueflasdfkaxjdfeKIacb&quot;</span><span style="color: #F8F8F2">,</span>
<span style="color: #F8F8F2">    refreshPayload: {</span>
<span style="color: #F8F8F2">      my_refresh_token: </span><span style="color: #E6DB74">&quot;{refreshToken}&quot;</span><span style="color: #F8F8F2">,</span>
<span style="color: #F8F8F2">      grant_type: </span><span style="color: #E6DB74">&quot;refresh_token&quot;</span><span style="color: #F8F8F2">,</span>
<span style="color: #F8F8F2">      foo: </span><span style="color: #E6DB74">&quot;another arbitrary field&quot;</span>
<span style="color: #F8F8F2">    }</span>
<span style="color: #F8F8F2">  }</span>
<span style="color: #F8F8F2">});</span>
</code></pre>
								<p>with the configuration above, a <strong><code>curl</code></strong> representation of the SDK&#39;s FORM POST, might look like this:</p>
								<pre><code class="language-bash"><span style="color: #F8F8F2">$ curl -X POST \</span>
<span style="color: #F8F8F2">  -F </span><span style="color: #E6DB74">&#039;my_refresh_token=smTsfaspfgaadsfgqZerUt0wueflasdfkaxjdfeKIacb&#039;</span><span style="color: #F8F8F2"> \</span>
<span style="color: #F8F8F2">  -F </span><span style="color: #E6DB74">&#039;grant_type=refresh_token&#039;</span><span style="color: #F8F8F2"> \</span>
<span style="color: #F8F8F2">  -F </span><span style="color: #E6DB74">&#039;foo=another arbitrary field&#039;</span><span style="color: #F8F8F2"> \</span>
<span style="color: #F8F8F2">  https://auth.your.server.com/tokens</span>
</code></pre>
							</dd>
						</dl>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="refreshtoken" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagOptional">Optional</span> refresh<wbr>Token</h3>
					<div class="tsd-signature tsd-kind-icon">refresh<wbr>Token<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
					<aside class="tsd-sources">
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>The token to be POSTed to <a href="authorization.html#refreshurl">refreshUrl</a>, encoded into the <a href="authorization.html#refreshpayload">refreshPayload</a>, when a new <a href="authorization.html#accesstoken">accessToken</a> is required after <a href="authorization.html#expires">expires</a> or when HTTP <code>401 Unauthorized</code> is received.</p>
						</div>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="refreshurl" class="tsd-anchor"></a>
					<h3><span class="tsd-flag ts-flagOptional">Optional</span> refresh<wbr>Url</h3>
					<div class="tsd-signature tsd-kind-icon">refresh<wbr>Url<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
					<aside class="tsd-sources">
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>The url to your authorization server that provides new <a href="authorization.html#accesstoken">accessToken</a> when expired.</p>
						</div>
						<p>When the SDK receives a response the server, it will decode the JSON and recursively iterate through the keys, performing regular expressions and other String-analysis <em>to &quot;taste&quot;</em> the data in search of the following 3 items:</p>
						<ol>
							<li>&quot;access token&quot;</li>
							<li>&quot;refresh token&quot;</li>
							<li>&quot;expiry time&quot;</li>
						</ol>
						<p>The SDK is designed to operate with <em>any</em> response data-structure.  For example, one authorization server might return a complex response such as:</p>
						<pre><code class="language-json"><span style="color: #F8F8F2">{</span>
<span style="color: #F8F8F2">  </span><span style="color: #66D9EF">&quot;token&quot;</span><span style="color: #F8F8F2">: {</span>
<span style="color: #F8F8F2">    </span><span style="color: #66D9EF">&quot;access_token&quot;</span><span style="color: #F8F8F2">: </span><span style="color: #CFCFC2">&quot;XXX.YYY.ZZZ&quot;</span><span style="color: #F8F8F2">,</span>
<span style="color: #F8F8F2">    </span><span style="color: #66D9EF">&quot;expires_at&quot;</span><span style="color: #F8F8F2">: </span><span style="color: #AE81FF">3900</span>
<span style="color: #F8F8F2">  },</span>
<span style="color: #F8F8F2">  </span><span style="color: #66D9EF">&quot;refresh_token&quot;</span><span style="color: #F8F8F2">: </span><span style="color: #CFCFC2">&quot;smTsfaspfgaadsfgqZerUt0wueflasdfkaxjdfeKIacb&quot;</span>
<span style="color: #F8F8F2">}</span>
</code></pre>
						<p>While another server might return a flat response, such as:</p>
						<pre><code class="language-json"><span style="color: #F8F8F2">{</span>
<span style="color: #F8F8F2"> </span><span style="color: #66D9EF">&quot;accessToken&quot;</span><span style="color: #F8F8F2">: </span><span style="color: #CFCFC2">&quot;XXX.YYY.ZZZ&quot;</span><span style="color: #F8F8F2">,</span>
<span style="color: #F8F8F2"> </span><span style="color: #66D9EF">&quot;refreshToken&quot;</span><span style="color: #F8F8F2">: </span><span style="color: #CFCFC2">&quot;smTsfaspfgaadsfgqZerUt0wueflasdfkaxjdfeKIacb&quot;</span><span style="color: #F8F8F2">,</span>
<span style="color: #F8F8F2"> </span><span style="color: #66D9EF">&quot;expiry&quot;</span><span style="color: #F8F8F2">: </span><span style="color: #AE81FF">3900</span>
<span style="color: #F8F8F2">}</span>
</code></pre>
						<p>When the response from the server is received, the event <a href="../classes/backgroundgeolocation.html#onauthorization">BackgroundGeolocation.onAuthorization</a> will be fired, provided with the <a href="authorizationevent.html">AuthorizationEvent</a>.</p>
					</div>
				</section>
				<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
					<a name="strategy" class="tsd-anchor"></a>
					<h3>strategy</h3>
					<div class="tsd-signature tsd-kind-icon">strategy<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
					<aside class="tsd-sources">
					</aside>
					<div class="tsd-comment tsd-typography">
						<div class="lead">
							<p>Authorization strategy.  Only <a href="https://jwt.io/">JWT</a> is supported.</p>
						</div>
					</div>
				</section>
			</section>
		</div>
		<div class="col-3 col-menu menu-sticky-wrap menu-highlight">
			<nav class="tsd-navigation primary menu-sticky">
				<ul class="before-current">
				</ul>
				<ul class="current">
					<li class="current tsd-kind-interface">
						<a href="authorization.html" class="tsd-kind-icon">Authorization</a>
						<ul>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="authorization.html#accesstoken" class="tsd-kind-icon">access<wbr>Token</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="authorization.html#expires" class="tsd-kind-icon">expires</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="authorization.html#refreshheaders" class="tsd-kind-icon">refresh<wbr>Headers</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="authorization.html#refreshpayload" class="tsd-kind-icon">refresh<wbr>Payload</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="authorization.html#refreshtoken" class="tsd-kind-icon">refresh<wbr>Token</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="authorization.html#refreshurl" class="tsd-kind-icon">refresh<wbr>Url</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="authorization.html#strategy" class="tsd-kind-icon">strategy</a>
							</li>
						</ul>
					</li>
				</ul>
				<ul class="after-current">
				</ul>
			</nav>
			<nav class="tsd-navigation secondary menu-sticky">
				<ul class="before-current">
				</ul>
				<ul class="current">
					<li class="current tsd-kind-interface">
						<a href="authorization.html" class="tsd-kind-icon">Authorization</a>
						<ul>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="authorization.html#accesstoken" class="tsd-kind-icon">access<wbr>Token</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="authorization.html#expires" class="tsd-kind-icon">expires</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="authorization.html#refreshheaders" class="tsd-kind-icon">refresh<wbr>Headers</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="authorization.html#refreshpayload" class="tsd-kind-icon">refresh<wbr>Payload</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="authorization.html#refreshtoken" class="tsd-kind-icon">refresh<wbr>Token</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="authorization.html#refreshurl" class="tsd-kind-icon">refresh<wbr>Url</a>
							</li>
							<li class=" tsd-kind-property tsd-parent-kind-interface">
								<a href="authorization.html#strategy" class="tsd-kind-icon">strategy</a>
							</li>
						</ul>
					</li>
				</ul>
				<ul class="after-current">
				</ul>
			</nav>
		</div>
	</div>
</div>
<footer class="with-border-bottom">
	<div class="container">
		<h2>Legend</h2>
		<div class="tsd-legend-group">
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
				<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
			</ul>
			<ul class="tsd-legend">
				<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
			</ul>
		</div>
	</div>
</footer>
<div class="container tsd-generator">
	<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-4NNZKTE395"></script>
<script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
        gtag('config', 'G-4NNZKTE395');
    </script>
</body>
</html>